<template>
	<div class="page">
		<el-pagination
			@current-change="handleCurrentChange"
			background
			layout="prev, pager, next"
			:total="listNum"
			:page-size="pageSize"
			>
		</el-pagination>
	</div>
</template>

<script>
export default {
	name : 'Pagination',
	props: {
		listNum: Number,
		pageSize: {
			type: Number,
			default: 20
		}
	},
	methods: {
		handleCurrentChange (page) {
			this.$emit("currentChange", page);
		}
	}
}
</script>

<style scoped lang="stylus">
	.page
		padding-top: 10px
		padding-bottom: 10px
		text-align: right
</style>